<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="box"></div>
</body>
<style>
    #box{
        width: 200px;
        height: 200px;
        background: red;
    }

    #box.bgcolor {
        background: burlywood;
    }
</style>
<script>
    /*
        function fun() {
        }
        const a = new fun();
        const b = x => x*x;
        const c = new b();
    */
    /*
        function fun() {
            console.log(this);
        }

        fun();
    */
/*
    const a = x => {
        console.log(this)
    };
    a();
*/
    const box = document.getElementById('box');
    box.addEventListener('click', function () {
        setTimeout(() => {
            this.className = 'bgcolor';
        },3000);
    });
</script>
</html>